import { message } from 'ant-design-vue';

import { checkCreatSiteForm } from "./formRuler";
// isBoolean:true, // 是否为Boolean类型, 参数是否必须为boolen类型，不是根据options个数判断，是根据后台字段类型要求判断
const sysSettingForm = [
  {
    value: '内容配置',
    type: 'title',
    id: 'contentSettingsDto',
    children: [
      {
        value: false,
        param: 'contentIssue',
        rule: {
          required: true,
          validator: checkCreatSiteForm,
          trigger: ["blur"],
          msg1: '',
          msg2: '',
          api: "",
          key: 'siteDomain',
          params: {}, //校验传参
        },
        label: "是否开启内容索引号:",
        type: 'radio',
        isBoolean: true, // 是否为Boolean类型
        options: ['是', '否'],
        tips: '',
      },
      {
        value: [],
        param: 'indexNumSetting',
        rule: {
          required: false,
          trigger: ["blur"],
          message: 'dhwjehdew'
        },
        label: "索引号生成设置:",
        marginLeft: 0,
        type: 'addDomain_associated',
        isBoolean: false, // 是否为Boolean类型
        tips: '',
        associated: 'contentIssue',
        associatedValue: true,
      },
      {
        value: 1,
        param: 'sequenceNumberGenerationRules',
        rule: {
          required: true,
          validator: checkCreatSiteForm,
          trigger: ["blur"],
          msg1: '',
          msg2: '',
          api: "",
          key: 'siteDomain',
          params: {}, //校验传参
        },
        label: "顺序号生成规则:",
        type: 'radio',
        isBoolean: false, // 是否为Boolean类型
        options: ['按发文机关内同年创建顺序生成', '按基础分类内同年创建顺序生成'],
        tips: '',
        associated: 'contentIssue',
        associatedValue: true,
      },
    ]
  },
  {
    value: '系统部署配置',
    type: 'title',
    id: 'sysDeploySettingsDto',
    children: [
      {
        value: '',
        placeholder: '请输入',
        param: 'port',
        rule: {
          required: false,
          validator: checkCreatSiteForm,
          trigger: ["blur"],
          msg1: '1111',
          msg2: '',
          api: "",
          key: 'siteDomain',
          params: {}, //校验传参
        },
        label: "端口号:",
        beforeText: '',
        afterText: '',
        type: 'textInput',
        associated: '',
        associatedValue: '',
      },
      {
        value: false,
        param: 'websiteWhiteListOpen',
        rule: {
          required: false,
          validator: checkCreatSiteForm,
          trigger: ["blur"],
          msg1: '',
          msg2: '',
          api: "",
          key: 'siteDomain',
          params: {}, //校验传参
        },
        label: "是否开启网站白名单:",
        type: 'radio',
        isBoolean: true, // 是否为Boolean类型
        options: ['是', '否'],
        tips: '',
      },
      {
        value: '',
        placeholder: '请输入域名',
        param: 'whiteList',
        rule: {
          required: false,
          validator: checkCreatSiteForm,
          trigger: ["blur"],
          msg1: '',
          msg2: '',
          api: "",
          key: 'siteDomain',
          params: {}, //校验传参
        },
        label: "自定义白名单:",
        beforeText: '',
        afterText: '',
        extra: '',
        marginLeft: 32,
        isReset: true,
        type: 'textArea',
        associated: 'websiteWhiteListOpen',
        associatedValue: true,
        tips: '默认已将本系统内所有站点所设置的域名作为白名单，可通过自定义设置添加额外的白名单',
      },
    ]
  },
  {
    value: '其他配置',
    type: 'title',
    id: 'otherSettingsDto',
    children: [
      {
        value: true,
        param: 'intranetMode',
        rule: {
          required: false,
          validator: checkCreatSiteForm,
          trigger: ["blur"],
          msg1: '',
          msg2: '',
          api: "",
          key: 'siteDomain',
          params: {}, //校验传参
        },
        label: "是否开启内网模式:",
        type: 'radio',
        isBoolean: true, // 是否为Boolean类型
        options: ['是', '否'],
        tips: '',
      },
      {
        value: true,
        param: 'contentPageQRCode',
        rule: {
          required: false,
          validator: checkCreatSiteForm,
          trigger: ["blur", "change"],
          msg1: '111111111',
          msg2: '',
          api: "",
          key: 'siteDomain',
          params: {}, //校验传参
        },
        label: "是否生成内容页二维码:",
        type: 'radio',
        isBoolean: true, // 是否为Boolean类型
        options: ['是', '否'],
        tips: '',
      },
      {
        value: [],
        param: 'tabPic',
        picId: '',
        picIdPram: 'tabPic',
        rule: {
          required: false,
          validator: checkCreatSiteForm,
          trigger: ["blur", "change"],
          msg1: '',
          msg2: '',
          api: "",
          key: 'siteDomain',
          params: {}, //校验传参
        },
        label: "系统标志:",
        beforeText: '',
        afterText: '',
        maxCount: 1,
        uploadTitle: '上传图片',
        accept: 'ico',
        extra: '请上传ico格式的图片，建议文件命名为favicon.ico',
        type: 'singlePictrueUpload',
        optionValue: '',
        associated: '',
        associatedValue: '',
      },
      {
        value: [],
        param: 'loginPagePic',
        picId: '',
        picIdPram: 'loginPagePic',
        rule: {
          required: true,
          validator: checkCreatSiteForm,
          trigger: ["blur", "change"],
          msg1: '请上传登录页logo图片！',
          msg2: '',
          api: "",
          type: 'Array',
          key: 'siteDomain',
          params: {}, //校验传参
        },
        label: "登录页logo:",
        beforeText: '',
        afterText: '',
        maxCount: 1,
        uploadTitle: '上传图片',
        accept: 'png,jpg,jpeg,gif, bmp',
        extra: '请上传jpg, png, gif, bmp, jpeg格式的图片',
        type: 'singlePictrueUpload',
        optionValue: '',
        associated: '',
        associatedValue: '',
      },
      {
        value: [],
        param: 'sysHeaderLogo',
        picId: '',
        picIdPram: 'sysHeaderLogo',
        rule: {
          required: true,
          validator: checkCreatSiteForm,
          trigger: ["blur", "change"],
          msg1: '请上传系统头部logo图片！',
          msg2: '',
          api: "",
          type: 'Array',
          key: 'siteDomain',
          params: {}, //校验传参
        },
        label: "系统头部logo:",
        beforeText: '',
        afterText: '',
        maxCount: 1,
        uploadTitle: '上传图片',
        accept: 'png,jpg,jpeg,gif',
        extra: '请上传png、jpg、jpeg、gif格式的图片，图片大小建议32*32PX的正方形图片',
        type: 'singlePictrueUpload',
        optionValue: '',
        associated: '',
        associatedValue: '',
      },
      {
        value: '',
        placeholder: '请输入',
        param: 'pageTitleSetting',
        rule: {
          required: false,
          validator: checkCreatSiteForm,
          trigger: ["blur"],
          msg1: '1111',
          msg2: '',
          api: "",
          key: 'siteDomain',
          params: {}, //校验传参
        },
        label: "网页title设置:",
        beforeText: '',
        afterText: '',
        extra: 'title设置的文案会显示在网页标签页中',
        type: 'textInput',
        associated: '',
        associatedValue: '',
      },
    ]
  },
]
export { sysSettingForm }